package com.fullstack.common.domain

object error {

  sealed trait ErrorInfo

  case class NotFound(what: String) extends ErrorInfo

  case class Unauthorized(realm: String) extends ErrorInfo

  case class Unknown(code: Int, msg: String) extends ErrorInfo

  case class ServerError(msg: String) extends ErrorInfo
  
  // 请求错误：新注册时，电话号码已存在； 登录错误：账号未注册 或 密码错误 等
  case class RequestError(msg: String) extends ErrorInfo

  case object NoContent extends ErrorInfo

}
